package com.wudl.juc;

/**
 * @author ：wudl
 * @date ：Created in 2021-11-27 0:46
 * @description：
 * @modified By：
 * @version: 1.0
 */

public class MyThread  extends  Thread{
    @Override
    public void run() {

        System.out.println(Thread.currentThread().getName() +"线程名称");

        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) throws InterruptedException {
        MyThread myThread = new MyThread();
        myThread.run();
//        myThread.join();
        System.out.println("main线程 - 执行完成");
    }
}
